package com.app.exception

import javax.ws.rs.WebApplicationException
import javax.ws.rs.core.Response

/**
 * 业务异常定义
 * 转换成 返回码
 *
 * Created by three on 14-7-30.
 */
class UserNotFoundException extends WebApplicationException {
    /**
     * Create a HTTP 404 (Not Found) exception.
     */
    public UserNotFoundException() {
        super(Response.status(Response.Status.NOT_FOUND).build());
    }

    /**
     * Create a HTTP 404 (Not Found) exception.
     * @param message the String that is the entity of the 404 response.
     */
    public UserNotFoundException(String message) {
        super(Response.status(Response.Status.NOT_FOUND).entity(message).type("text/plain").build());

    }
}
